<?php  function getuserid(){ 	global $tsql,$tb_user; 	$tsql->query("select userid,fid,ifson from `$tb_user` where username='".$_SESSION['uusername']."'"); 	$tsql->next_record(); 	if($tsql->f('userid')!='' & $tsql->f('ifson')==0 &  $tsql->f('ifagent')==0) return $tsql->f('userid');   }   ?>